package game.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import common.model.po.GItem;
import common.model.request.base.PaginationRequest;
import common.model.response.base.Result;
import game.model.request.SaveItemRequest;
import game.model.request.SearchItemRequest;
import game.model.vo.BuildingDetailVo;
import game.model.vo.ItemDetailVo;
import game.model.vo.SearchItemVo;

/**
 * 物品（包括零件和设备两类）服务类
 *
 * @author 米泽鹏
 * @since 2022-02-26
 */
public interface GItemService extends IService<GItem> {

	/**
	 * 物品分页查询
	 *
	 * @param paginationRequest PaginationRequest<SearchItemRequest, GItem>
	 * @return Page<GItem>
	 */
	Page<SearchItemVo> searchItemByPage(PaginationRequest<SearchItemRequest, GItem> paginationRequest);

	/**
	 * 物品新增或更新
	 *
	 * @param request SaveItemRequest
	 * @return Result
	 */
	Result<?> saveItem(SaveItemRequest request);

	/**
	 * 物品删除
	 *
	 * @param id Long
	 * @return Result
	 */
	Result<?> deleteItem(Long id);

	/**
	 * 单个物品查询
	 *
	 * @param itemId 物品id
	 * @return ItemDetailVo
	 */
	ItemDetailVo getItemDetailById(Long itemId);

}
